<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSitesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('sites', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned()->comment('关联用户ID');
            $table->string('title')->comment('站点标题');
            $table->text('video_link')->nullable()->comment('视频链接');
            $table->string('video_title')->nullable()->comment('视频标题');
            $table->string('top_image_src')->nullable()->comment('视频顶部图片地址');
            $table->string('top_image_link')->nullable()->comment('视频顶部图片链接');
            $table->string('template_color')->nullable()->comment('模板颜色');
            $table->string('qrcode_link')->nullable()->comment('二维码链接');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('sites');
    }
}
